Filename | (eval 1129)[/usr/share/perl/5.10/CGI.pm:869] |
Statements | Executed 16 statements in 33µs |
Eval Invoked At | /usr/share/perl/5.10/CGI.pm line 869 |
Sibling evals | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
2 | 2 | 2 | 36µs | 169µs | _name_and_path_from_env | CGI::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # spent 169µs (36+133) within CGI::_name_and_path_from_env which was called 2 times, avg 85µs/call:
# once (24µs+123µs) by CGI::path_info at line 832 of CGI.pm
# once (12µs+11µs) by CGI::script_name at line 6 of (eval 1131)[CGI.pm:869] | ||||
2 | 2 | 1µs | my $self = shift; | ||
3 | 2 | 2µs | my $script_name = $ENV{SCRIPT_NAME} || ''; | ||
4 | 2 | 1µs | my $path_info = $ENV{PATH_INFO} || ''; | ||
5 | 2 | 8µs | 2 | 105µs | my $uri = $self->request_uri || ''; # spent 104µs making 1 call to CGI::AUTOLOAD
# spent 1µs making 1 call to CGI::request_uri |
6 | |||||
7 | 2 | 6µs | 2 | 1µs | $uri =~ s/\?.*//s; # spent 1µs making 2 calls to CGI::CORE:subst, avg 700ns/call |
8 | 2 | 5µs | 2 | 24µs | $uri = unescape($uri); # spent 24µs making 2 calls to CGI::Util::unescape, avg 12µs/call |
9 | |||||
10 | 2 | 1µs | if ($uri ne "$script_name$path_info") { | ||
11 | my $script_name_pattern = quotemeta($script_name); | ||||
12 | my $path_info_pattern = quotemeta($path_info); | ||||
13 | $script_name_pattern =~ s{(?:\\/)+}{/+}g; | ||||
14 | $path_info_pattern =~ s{(?:\\/)+}{/+}g; | ||||
15 | |||||
16 | if ($uri =~ /^($script_name_pattern)($path_info_pattern)$/s) { | ||||
17 | # REQUEST_URI and SCRIPT_NAME . PATH_INFO only differ by the | ||||
18 | # numer of consecutive slashes, so we can extract the info from | ||||
19 | # REQUEST_URI: | ||||
20 | ($script_name, $path_info) = ($1, $2); | ||||
21 | } | ||||
22 | } | ||||
23 | 2 | 7µs | return ($script_name,$path_info); | ||
24 | } | ||||
25 | |||||
26 | ; |